﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.Web.UI.HtmlControls;

using AjaxControlToolkit;
using BizElements.Core;
using BizElements.BusinessLayer;

namespace BizElements.Web
{
    /// <summary>Represents bindings between child collection and <see cref="BizElements.Web.ICollectionEditor"/> user control.</summary>
    public interface IChildrenBinding
    {
        // TODO: Try to get rid of TabIndex. It is to specific.

        #region Properties.

        /// <summary>Child entity collection property name.</summary>
        string ChildrenPropertyName { get; }

        /// <summary>ID of collection editor control.</summary>
        string CollectionEditorId { get; }

        /// <summary>Optional relative URL of dedicated child URL.</summary>
        string ChildFormUrl { get; }

        /// <summary>Index of tab page or accordion panel that contains collection editor.</summary>
        int TabIndex { get; }

        #endregion

        #region Methods.

        /// <summary>Gets collection editor to which a child collection is bound to.</summary>
        ICollectionEditor GetCollectionEditor(Control parentBizobjControl);

        #endregion
    }
}
